n,X,Y=map(int,input().split())

class node:
    def __init__(self,no,dis):
        self.no=no
        self.dis=dis
    def __lt__(self,n):
        return self.dis<n.dis or self.dis==n.dis and self.no<n.no

ps=[]

for i in range(1,n+1):
    x,y=map(int,input().split())
    r=(x-X)**2+(y-Y)**2
    ps.append(node(i,r))

ps.sort()

print(ps[0].no)
print(ps[1].no)
print(ps[2].no)
